package com.gadgets.busi.bm08.common.utils;

import com.gadgets.framework.common.exception.GadgetsServiceException;
import com.gadgets.framework.common.util.CacheUtils;
import com.gadgets.framework.common.util.PropertiesUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.io.IOException;

/**
 * @author UncleXiu
 * @version V1.0.0
 * @data 2020-11-02
 *
 */
@Component
public class GadgetsBm08Utils {

    @Autowired
    private CacheUtils cacheUtils;

    /**
     * 获取 gadgets-bm08-da.properties 的系统参数
     * @param propName          属性名
     * @return                  属性值
     * @throws GadgetsServiceException
     */
    public static String getBm08DaProperties(String propName) throws GadgetsServiceException {
        try {
            return PropertiesUtils.getPropertyByValue("config/gadgets-bm08-da.properties",propName);
        }catch (IOException e) {
            throw new GadgetsServiceException(e);
        }
    }

}
